#include "EVector.h"
#include "EMath.h"
#include "eCPP.h"

namespace engine
{

//------------------------------------------------------------


//------------------------------------------------------------
EVector::EVector() :
Vector3()
{

}

/*//------------------------------------------------------------
EVector::EVector( const Vector3& vVec) :
Vector3( vVec )
{

}

//------------------------------------------------------------
EVector::EVector( const NxVec3& vVec )
{
  x = vVec.x;
  y = vVec.y;
  z = vVec.z;
}

//------------------------------------------------------------
EVector::EVector(float x, float y, float z ) :
Vector3(static_cast<Real>(x), static_cast<Real>(y), static_cast<Real>(z))
{

}*/

//------------------------------------------------------------
void EVector::fastNormalize()
{
  float fSquaredLength = x*x + y*y + z*z;
  cASSERT( fSquaredLength != 0.f );
  if( fSquaredLength == 0.f ) return;
  float fInvSqrt = EMath::fastInvSqrt( fSquaredLength );
  x *= fInvSqrt;
  y *= fInvSqrt;
  z *= fInvSqrt;
}

} // end namespace